package itheima.com.Demo01.demo01.Map;

import java.util.HashMap;
import java.util.Map;

public class MapTest01 {
    public static void main(String[] args) {
        Map<String,String> M=new HashMap<>();
        M.put("001","张三");
        M.put("002","张三");




        method01(M);
        System.out.println("---------------");
        System.out.println(M);


    }

    private static void method01(Map<String, String> m) {
        String s = m.put("003", "旧张三");
        String s1 = m.put("003", "新张三");
        System.out.println(s);
        System.out.println(s1);
    }
}
